home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / host contacted / jikes.lha / jikes-1.11 / src / jikes.cpp < prev    next >
C/C++ Source or Header  |  2000-01-16  |  4KB  |  107 lines

  1. // $Id: jikes.cpp,v 1.65 2000/01/11 02:50:15 lord Exp $
  2. //
  3. // This software is subject to the terms of the IBM Jikes Compiler
  4. // License Agreement available at the following URL:
  5. // http://www.ibm.com/research/jikes.
  6. // Copyright (C) 1996, 1999, International Business Machines Corporation
  7. // and others.  All Rights Reserved.
  8. // You must accept the terms of that agreement to use this software.
  9. //
  10.  
  11. #include "config.h"
  12. #include <iostream.h>
  13. #include <assert.h>
  14. #include "control.h"
  15. #include <stdio.h>
  16.  
  17. #ifdef __amigaos__
  18. // Jikes definitely needs more than the default 4K stack. Without ICU support,
  19. // about 8K seem to be enough. With ICU support stack requirements rise to
  20. // about 26K, so we round this value up to 30K to play it safe.
  21. extern "C" {
  22.   unsigned long __stack = 30000;
  23. }
  24. #endif
  25.  
  26. int main(int argc, char *argv[])
  27. {
  28.     int return_code;
  29.  
  30.     SetNewHandler();
  31.  
  32.     FloatingPointCheck();
  33.  
  34.     ArgumentExpander *arguments = new ArgumentExpander(argc, argv);
  35.  
  36.     Option *option = new Option(*arguments);
  37.  
  38.     if (option -> first_file_index < arguments -> argc)
  39.     {
  40.         Control *control = new Control(*arguments, *option);
  41.         return_code = control -> return_code;
  42. #ifdef NO_LEAKS
  43.         delete control;
  44. #endif
  45.     }
  46.     else
  47.     {
  48.         fprintf(stderr,
  49.         "\nJikes Compiler"
  50.         "\n(C) Copyright IBM Corp. 1997, 2000.\n"
  51.         "- Licensed Materials - Program Property of IBM - All Rights Reserved.\n\n");
  52.         fprintf(stderr, "%s", StringConstant::U8S_command_format);
  53.         fprintf(stderr,
  54.         "\n\n"
  55.         "-classpath path    use path for CLASSPATH\n"
  56.         "-d dir             write class files in directory dir\n"
  57.         "-debug             no effect (recognized for compatibility)\n"
  58.         "-depend | -Xdepend recompile all used classes\n"
  59.         "-deprecation       report uses of deprecated features\n"
  60.         "-encoding encoding use specified encoding to read source files\n"
  61.         "-g                 debug (generate LocalVariableTable)\n"
  62.         "-nowarn            do not issue warning messages\n"
  63.         "-nowrite           do not write any class files\n"
  64.         "-O                 do not write LineNumberTable\n"
  65.         "-verbose           list files read and written\n"
  66.         "-Xstdout           redirect output listings to stdout\n"
  67.         "++                 compile in incremental mode\n"
  68.         "+B                 do not invoke bytecode generator\n"
  69.         "+c                 do not discard comments from lexer output\n"
  70.         "+CSO               search for both java and classfile in classpath\n"
  71.         "+D                 report errors immediately in emacs-form without buffering\n"
  72.         "+DR=filename       generate dependence report in filename\n"
  73.         "+E                 list errors in emacs-form\n"
  74.         "+F                 do full dependence check except for Zip and Jar files\n"
  75.         "+Kname=TypeKeyWord map name to type keyword\n"
  76.         "+M                 generate makefile dependencies\n"
  77.         "+P                 pedantic compilation - issues lots of warnings\n"
  78.         "+Td...d            set value of tab d...d spaces; each d is a decimal digit\n"
  79.         "+U                 do full dependence check including Zip and Jar files\n"
  80.         "+Z                 treat cautions as errors\n"
  81. #ifdef TEST
  82.         "Debugging options:\n"
  83.         "+A                 dump AST to standard output\n"
  84.         "+C                 dump bytecodes to standard output\n"
  85.         "+L                 dump lexer output (stream of tokens)\n"
  86.         "+O numbytes        call no-op op_trap() for bytecodes of the given length\n"
  87.         "+u                 unparse AST; produces Java code for the AST\n"
  88.         "+ud                unparse AST, with extra debugging information\n"
  89. #endif
  90.         "\nVersion 1.11 (10 Jan 2000)\n"
  91.         "Originally written by Philippe Charles and David Shields \n"
  92.         "of IBM Research, Jikes is now maintained and refined by the\n"
  93.         "Jikes Project at http://ibm.com/developerworks/opensource.\n"
  94.         "Please consult this URL for more information and to learn \n"
  95.         "how to report problems.\n");
  96.  
  97.         return_code = 1;
  98.     }
  99.  
  100. #ifdef NO_LEAKS
  101.     delete arguments;
  102.     delete option;
  103. #endif
  104.  
  105.     return return_code;
  106. }
  107.